This repository was archived by the owner on Oct 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove everything related to dogstatsd and disable metrics, in future then can be enable again and connected to the otel metrics api
That logic is not needed to send traces to opentelemetry
The following is the list of references that had been renamed. DATADOG_ -> OPENTELEMETRY_ Datadog -> OpenTelemetry DD_ -> OTEL_ _dd -> _otel ddtrace -> oteltrace _datadog_ -> _opentelemetry_ datadog_ -> opentelemetry_ datadog/foo -> opentelemetry/foo datadog.tracer -> opentelemetry.tracer datadog -> opentelemetry dd_ -> otel_ aotel -> add DDLogger -> OtelLogger dd\.trace -> otel\.trace dd\.span -> otel\.span dd-trace-py -> otel-trace-py dd-trace-py -> otel-trace-py https://github.com/DataDog -> https://github.com/opentelemetry https://github.com/DataDog -> https://github.com/opentelemetry 'http://www.datadog.com/' -> 'http://opentelemetry.io/'
python 2.7 is not supported by OpenTelemetry
The APIOtel class uses an OpenTelemetry SDK exporter to send traces. The exporter to be used must be passed at creation time. This commit also modifies the writer class to receive the API object to use as a paremeter, it also extends tracer.configure() to allow to set the api object. ... from oteltrace import patch_all patch_all() import oteltrace from opentelemetry.ext.jaeger import JaegerSpanExporter from oteltrace.api_otel_exporter import APIOtel jaeger_exporter = JaegerSpanExporter( service_name='my-helloworld-service', ) oteltrace.tracer.configure( api=APIOtel(exporter=jaeger_exporter) ) application starts here... ... Users of oteltrace-run can configure it by using some env variables: - OTEL_EXPORTER_MODULE specifies the python module where the exporter is implemented - OTEL_EXPORTER_FACTORY defines a function to be called to get an instance of the exporter. The options passed to OTEL_EXPORTER_FACTORY are defined also using env variables, all variables starting with OTEL_EXPORTER_OPTIONS_ will be passed as kwargs.
This commit implements new http propagators in other to be compatible with OpenTelemetry instrumented apps: - w3c: default context propagator in opentelemetry - b3: another choice tracer.configure() was extended to accept a new parameter, "http_propagator", this is a factory function that will be used to get new instances of the propagator to be used. The following is an example of how to set b3 as the propagator: ... from oteltrace.propagation.b3 import B3HTTPPropagator oteltrace.tracer.configure( http_propagator=B3HTTPPropagator ) ... Users of oteltrace-run can choose the propagator to be used by setting the OTEL_TRACER_PROPAGATOR env variable to one of the current supported values: w3c, b3 and datadog.
This commit add two basic examples the first one shows how to use oteltrace-run and how to configure the opentelemetry and http propagator by using env variables. The second example uses the oteltrace API to perform the exporter and the propagator.
test integration uses ddog agent & api, that does not exist anymore
Looks good. Is there a test for w3c context propagation and I just missed it? |
There is this https://github.com/w3c/trace-context/tree/master/test. It's used in opentelemetry-python: open-telemetry/opentelemetry-python#228. The idea is to follow a similar approach here and use that for testing the w3c. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes a series of commits that implemented otel-trace-py.
-- compatibility with opentelemetry exporters and api to configure them
-- w3c and b3 propagators support